aboutsummaryrefslogtreecommitdiff
path: root/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenIntAddTests]/[method:canGenerateCodeForIntAdd(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
blob: 74c72b1bce5029fafc3c4714f85e569f67ef8beb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Compilation unit elements:


Locals:
 * (val "binaryOpResult__0" int)
 * (val "intPointer__0" data-ptr)
 * (val "intBinaryOpLeftValue__0" int)
 * (val "intPointer__1" data-ptr)
 * (val "intBinaryOpLeftValue__1" int)
 * (val "intBinaryOpResultValue__0" int)
 * (val "intPointer__2" data-ptr)

Instructions:

(
    (int-to-data-ptr (local "intPointer__0") (local "b"))
    (
        memory-load
        (local "intBinaryOpLeftValue__0")
        pointer=(local "intPointer__0")
        layout=(struct (int))
        offset=(0)
    )
    (int-to-data-ptr (local "intPointer__1") (local "c"))
    (
        memory-load
        (local "intBinaryOpLeftValue__1")
        pointer=(local "intPointer__1")
        layout=(struct (int))
        offset=(0)
    )
    (int-add (local "intBinaryOpResultValue__0") (local "intBinaryOpLeftValue__0") (local "intBinaryOpLeftValue__1"))
    (alloc-heap (local "intPointer__2") (struct (int)))
    (
        memory-store
        pointer=(local "intPointer__2")
        layout=(struct (int))
        offset=(0)
        value=(local "intBinaryOpResultValue__0")
    )
    (data-ptr-to-int (local "binaryOpResult__0") (local "intPointer__2"))
)

Temporary stack:
 * PatioLocalRef[name=binaryOpResult__0]
 * PatioLocalRef[name=a]